#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui>
#include <QObject>
#include <QDialog>
#include <QSqlDatabase>
#include <QSqlError>
#include <QMessageBox>

#include "modifydialog.h"

class mainWindow: public QMainWindow
{
    Q_OBJECT
    public:
        mainWindow();
        ~mainWindow();
    private:
        QTabWidget *navigation_tab;    // the left part

      //  QListWidget *entry_list; //main body of this application, display all the entries
        QListWidget *class_list; //display all classes in the navigation area
        QListWidget *tag_list; // display all tags in the navigation area
        QTextEdit *entry_display;// display the formatted entries
        QTreeWidget *entry_list;

        //add menu widgets here
        QMenu * menu_file;
        QMenu * menu_about;

        //add menu acctions here
        QAction * action_about;
        QAction * action_new_entry;

        QDialog * dialog;
		
        QSqlDatabase db;

        QVector<QTreeWidgetItem *> entry_item;

        modifyDialog * modifyDia;

        //gui init
        void create_Menu();
        void create_Status_Bar();
        void create_Navigation_Tab();
        void create_Display();
        void create_Main();

    private slots:
        void about();
        void new_Entry();
        void modify_Entry(QTreeWidgetItem * ditem);
        void update_List();
};

#endif // MAINWINDOW_H
